package com.spzx.channel.controller;

import com.spzx.channel.service.IItemService;
import com.spzx.common.core.web.controller.BaseController;
import com.spzx.common.core.web.domain.AjaxResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.management.loading.PrivateClassLoader;

/**
 * ClassName: ItemController
 * Package: com.spzx.channel.controller
 * Description:
 *
 * @Author ycy
 * @Create 2024/8/13 17:03
 * @Version 1.0
 */
@Tag(name = "商品详情接口")
@RestController
@RequestMapping("/item")

public class ItemController extends BaseController {
    @Autowired
    private IItemService itemService;

    @Operation(summary = "商品详情")
    @GetMapping("/{skuId}")
    public AjaxResult item(@PathVariable("skuId")Long skuId)    {
        return success(itemService.item(skuId));
    }


}
